The present invention relates to a bus system with stations interconnected over a bus, one station of which is set up as a master and the other stations being set up as slaves, with a diagnostic device and a method of diagnosing stations interconnected over a bus system, one station of which is set up as a master with the other stations functioning as slaves.
A known bus system and method are described in International Patent No. WO 90/09631. With this known bus system and method, functioning of the data bus and/or functioning of the stations is monitored with the help of fault detection signals in the form of watchdog signals, and in the event of a fault, defined emergency operation modes are initiated, with two different emergency operation modes being implementable. With this fault detection method, signals are periodically sent and received repeatedly, with the stations participating in bus traffic expecting the external fault detection signals within a predetermined time reference. This does not provide for any further fault diagnosis.
An object of the present invention is to make available a bus system having a plurality of stations and a method of the for diagnosing the outputs of the stations.
According to the present invention, the bus system is designed so that a diagnostic device is provided only in the master; current and/or voltage information from at least one output of at least one slave to be diagnosed is stored in the diagnostic device, and diagnosis of the outputs can be performed under preselected and preselectable conditions on the basis of a program stored in the master.
This method provides for the diagnostic device to have a short-circuit detecting device and an interrupt detection device and for a diagnostic mode to be started for diagnosis at a preselectable time, for the outputs of all slaves to be switched to preselected states according to a program present in the master, and for the outputs that are to be diagnosed to be queried in succession with regard to a short-circuit or an interrupt in the preselected states, with the diagnosis being performed in the master.
With these measures, diagnosis of the stations with regard to various faults can be performed with a simple setup, so that information on the type of fault can be derived and fault strategies aimed at the given type of fault can be implemented. In the entire bus system, the expenditure for the diagnostic device and the related costs fall due only once for the master.
If it is provided that the bus system with the stations and their outputs can be switched into a defined state for diagnosis of a short-circuit or an interrupt, with the current or voltage state prevailing at the output to be diagnosed being detectable and that diagnosis can be performed on the basis of the stored current and/or voltage information and the detected current or voltage state, then differentiated information regarding whether a short-circuit or an interrupt has been detected at a respective output can be obtained. The information stored in the diagnostic device makes it possible to determine the extent of a short-circuit or an interrupt and to coordinate an appropriate fault strategy. For example, it is possible to ascertain in this way whether only part of a winding of a stepping motor is defective.
The diagnostic measures can be performed to advantage with a setup whereby the diagnostic device has a reversible resistance device and/or a reversible measuring amplifier.
According to the present invention, if all stations are run into the lowest power consumption state after the start of the diagnostic mode, with a change in state of the stations being prevented except for the output to be diagnosed, then a definite state of the bus system prevails for performing the diagnosis, so that faults can be detected reliably.
The procedure is advantageous in that the current measurement range of a diagnostic device provided in the master for detecting a short-circuit is set as large as possible and the gain is set as low as possible; then the output to be diagnosed in a slave is turned on, and if a set current for this output is exceeded, a short-circuit is diagnosed. With these measures, the diagnostic device is protected from the risk of damage in the event a short-circuit actually occurs and the high current occurring with it, while the measurement range can then be reduced to detect an incomplete short-circuit.
A sensitivity suitable for detection of an interrupt is achieved, with the sensitivity for detection of different interrupt degrees being incrementally adjustable. If there are also provisions so that the current measurement range in the master is reduced or the gain is increased to detect an interrupt, then the output to be diagnosed is disconnected and an interrupt is diagnosed if the signal detected is below a specified smallest current change.
Furthermore, a systematic diagnosis of the outputs to be tested for short-circuit and interrupt is made possible if the procedure is such that the short-circuit diagnosis and the interrupt diagnosis are performed in succession in this order at all outputs to be diagnosed. The interrupt diagnosis is performed only when no short-circuit has previously been diagnosed at the same output, and the diagnosis is concluded when all the outputs to be diagnosed have been tested.
In the event a fault is detected, the measures are advantageous in that a fault entry is made when a short-circuit is detected in the diagnostic device and a programmed short-circuit strategy is performed, and if an interrupt is detected in the diagnostic device, a fault entry and a programmed interrupt strategy are implemented.